# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureView do
  @moduledoc """
  FeatureView is representation of values that the FeatureOnlineStore will serve based on its syncConfig.

  ## Attributes

  *   `bigQuerySource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewBigQuerySource.t`, *default:* `nil`) - Optional. Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this FeatureView was created.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
  *   `featureRegistrySource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource.t`, *default:* `nil`) - Optional. Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore.
  *   `indexConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewIndexConfig.t`, *default:* `nil`) - Optional. Configuration for index preparation for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. The labels with user-defined metadata to organize your FeatureViews. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one FeatureOnlineStore(System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
  *   `optimizedConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewOptimizedConfig.t`, *default:* `nil`) - Optional. Configuration for FeatureView created under Optimized FeatureOnlineStore.
  *   `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
  *   `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
  *   `serviceAccountEmail` (*type:* `String.t`, *default:* `nil`) - Output only. A Service Account unique to this FeatureView. The role bigquery.dataViewer should be granted to this service account to allow Vertex AI Feature Store to sync data to the online store.
  *   `serviceAgentType` (*type:* `String.t`, *default:* `nil`) - Optional. Service agent type used during data sync. By default, the Vertex AI Service Agent is used. When using an IAM Policy to isolate this FeatureView within a project, a separate service account should be provisioned by setting this field to `SERVICE_AGENT_TYPE_FEATURE_VIEW`. This will generate a separate service account to access the BigQuery source table.
  *   `syncConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewSyncConfig.t`, *default:* `nil`) - Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this FeatureView was last updated.
  *   `vertexRagSource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewVertexRagSource.t`, *default:* `nil`) - Optional. The Vertex RAG Source that the FeatureView is linked to.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bigQuerySource =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewBigQuerySource.t()
            | nil,
          :createTime => DateTime.t() | nil,
          :etag => String.t() | nil,
          :featureRegistrySource =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource.t()
            | nil,
          :indexConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewIndexConfig.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :optimizedConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewOptimizedConfig.t()
            | nil,
          :satisfiesPzi => boolean() | nil,
          :satisfiesPzs => boolean() | nil,
          :serviceAccountEmail => String.t() | nil,
          :serviceAgentType => String.t() | nil,
          :syncConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewSyncConfig.t() | nil,
          :updateTime => DateTime.t() | nil,
          :vertexRagSource =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewVertexRagSource.t()
            | nil
        }

  field(:bigQuerySource,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewBigQuerySource
  )

  field(:createTime, as: DateTime)
  field(:etag)

  field(:featureRegistrySource,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource
  )

  field(:indexConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewIndexConfig
  )

  field(:labels, type: :map)
  field(:name)

  field(:optimizedConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewOptimizedConfig
  )

  field(:satisfiesPzi)
  field(:satisfiesPzs)
  field(:serviceAccountEmail)
  field(:serviceAgentType)

  field(:syncConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewSyncConfig
  )

  field(:updateTime, as: DateTime)

  field(:vertexRagSource,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewVertexRagSource
  )
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureView do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureView.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureView do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
